package com.java.simple.study.jvm.memstruct.stack;

/**
 * @author zhoujunlin
 * @date 2021/12/11
 * @desc 方法局部变量是否线程安全
 **/
public class Demo1_2 {

    public void m1(){
        StringBuilder sb = new StringBuilder();
        sb.append("线程").append("安全");
    }

    public void m2(StringBuilder sb){
        sb.append("线程").append("不安全");
    }

    public StringBuilder m3(){
        StringBuilder sb = new StringBuilder();
        sb.append("线程").append("安全");
        return sb;
    }

}
